#include <stdio.h>
#include <string.h>

struct{
	unsigned int widthValidated;
	unsigned int heightValidated;
}status1;

struct{
	unsigned int widthValidated:1;
	unsigned int heightValidated:1;
	unsigned int anotherValidated:1;
	unsigned int another2:30;
	unsigned int another3:1;
}status2;

struct {
	unsigned int age: 3;
}Age;

void testBitFields(){
	printf("Memory size occupied by status1: %lu\n", sizeof(status1));
	printf("Memory size occupied by status2: %lu\n", sizeof(status2));

	Age.age = 4;
	printf("SizeOf(Age): %lu\n", sizeof(Age));
	printf("Age.age: %d\n", Age.age);
	Age.age = 7;
	printf("Age.age: %d\n", Age.age);
	Age.age = 8;
	printf("Age.age: %d\n", Age.age);
}
